package com.aaa.sys.controller;


import com.aaa.vo.R;
import com.aaa.sys.service.OperationLogService;
import com.aaa.sys.vo.OperationLogResult;
import com.aaa.sys.vo.OperationLogVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 操作日志 前端控制器
 * </p>
 *
 * @author ykq
 * @since 2020-12-08
 */
@RestController
@RequestMapping("/system/operationLog")
public class OperationLogController {

    @Autowired
    private OperationLogService operationLogService;

    @PostMapping("findByCondition/{current}/{limit}")
    public R findByCondition(@PathVariable Integer current, @PathVariable Integer limit, @RequestBody OperationLogVo operationLogVo){
        IPage<OperationLogResult> page=this.operationLogService.findByCondition(current,limit,operationLogVo);
        return R.ok().data("records",page.getRecords()).data("total",page.getTotal());
    }
}

